<#if tempAttachs?exists && tempAttachs?size gt 0>
<#assign contextPath = request.contextPath/>
<script type="text/javascript">
	$(function(){
		$(".category").ligerComboBox({
            width: 180,
            selectBoxWidth: 200,
            selectBoxHeight: 200, valueField: 'text',treeLeafOnly:false,
            tree: { data: ${treeData},checkbox:false}
        });
	});
</script>
<div style="border-bottom: 1px dashed #DDD;margin-bottom:10px;">
			<table cellpadding="0" cellspacing="0" class="l-table-edit">
		            <tr>
		                <td align="right" class="l-table-edit-th">标题:</td>
		                <td align="left" class="l-table-edit-td" >
		                	<input type="text" class="inputText required" value="${tempAttachs[0].attachName}" id="filename" name="files[0].fileName" maxlength="50" ltype="text" style="width:595px;" />
		                </td>
		            </tr>
		            <tr>
		                <td align="right" class="l-table-edit-th" valign="top">分类:</td>
		                <td align="left" class="l-table-edit-td">
		                	<span id="cateinput" style="margin-right:30px;"></span>
		                    <@s.hidden id="cateinputHidden" name="files[0].category"  value=""/>
		                    <@s.hidden id="cateIdHidden" name="files[0].categoryId" value=""/>
							<a id="choose" class="minibutton" style="width:70px;"><span>修改分类</span></a>
						</td>
		            </tr>   
		            <tr>
		                <td align="right" class="l-table-edit-th" valign="top">介绍:</td>
		                <td align="left" class="l-table-edit-td">
		                    <textarea id="all-summary" name="files[0].desc" maxlength="1000" cols="100" rows="10" class="l-textarea" style="width:600px"></textarea>
		                </td>      
		            </tr>  
		 			<tr>
		                <td align="right" class="l-table-edit-th">关键词:</td>
		                <td align="left" class="l-table-edit-td">
		                	<input type="text" class="inputText" value="" id="all-keyword" name="files[0].keyword" maxlength="100" ltype="text" style="width:595px;"/>
		                </td>
		            </tr>
		            <script type="text/javascript">
						$(function(){
							$('#choose').click(function(){
								myfile.chooseCate();
							});
						});
					</script>
		            <tr>
		                <td align="right" class="l-table-edit-th"></td>
		                <td align="left" class="l-table-edit-td">
		                	是否可下载:<input class="inputCheckbox" type="checkbox" name="files[0].canDownStr" checked="checked" />
		                	是否可评论:<input class="inputCheckbox" type="checkbox" name="files[0].canFaqStr" checked="checked" />
		                </td>
		            </tr>
		            <tr>
		                <td align="right" class="l-table-edit-th">附件显示位置:</td>
		                <td align="left" class="l-table-edit-td">
		                	下方:<input class="inputCheckbox" type="radio" name="files[0].attachPosition" value="1" checked="checked" />
		                	右方:<input class="inputCheckbox" type="radio" name="files[0].attachPosition" value="2"  />
		                </td>
		            </tr>
		        </table>

</div>
<div  class="sList" style="margin-bottom:20px;">
<table width="100%" class="sTable" cellpadding="0" cellspacing="0" border="0" >
	<tr>
		<th class="sTh">附件名称</th>
		<th class="sTh">图片</th>
		<th class="sTh">操作</th>
	</tr>
<#list tempAttachs as a>
	<tr class="<#if a_index%2==0>sRow1<#else>sRow2</#if>">
		<td class="sCell">
			
			<#if a.attachName?exists>
				<#if a.attachName?length gte 40>
					<#assign name=a.attachName?substring(0,40)+"..." />
				<#else>
					<#assign name=a.attachName />
				</#if>
			</#if>
			${name}
		</td>
		<td class="sCell" style="width:80px;" align="center">
			<a href="javascript:myfile.uploadImage('${a.guid}');" id="up${a.guid}" class="minibutton" style="width:70px;"><span>添加图片</span></a>
			<div id="ic${a.guid}" style="width:660px;">
		
			</div>
		</td>
		<script type="text/javascript">
			$(function(){
				loadImage('${a.guid}');
			});
		</script>
		<td class="sCell" style="width:80px;" align="center">
			<a class="sliverbutton" href="javascript:delAttach(${a.id});"><span>删除</span></a>
		</td>
	</tr>
</#list>
</table>
</div>
<div align="center" style="margin-bottom:20px;">
	<a href="javascript:submit();" class="minibutton"><span>提 交</span></a>
</div>
</#if>
